package com.xiaoyu.merchant.model;

import android.text.TextUtils;

import java.util.Map;

/**
 * 支付结果
 * Created by jk on 2018/6/19.
 */
public class PayResult {
    private String resultStatus;
    private String result;
    private String memo;//备注

    public PayResult(Map<String,String> rawResult){
        if (rawResult == null)
            return;
        for (String key : rawResult.keySet()){
            if (TextUtils.equals(key,"resultStatus")){
                resultStatus = rawResult.get(key);
            }else if (TextUtils.equals(key,"result")){
                result = rawResult.get(key);
            }else if (TextUtils.equals(key,"memo")){
                memo = rawResult.get(key);
            }
        }
    }

    @Override
    public String toString() {
        return "resultStatus={" + resultStatus + "};memo={" + memo
                + "};result={" + result + "}";
    }

    /**
     * @return the resultStatus
     */
    public String getResultStatus() {
        return resultStatus;
    }

    /**
     * @return the result
     */
    public String getResult() {
        return result;
    }

    /**
     * @return the memo
     */
    public String getMemo() {
        return memo;
    }
}
